def insert_sort(new_arr):
    if new_arr is None:
        return []
    for j in range(2, len(new_arr)):
        key = new_arr[j]
        i = j - 1
        while i >= 0 and new_arr[i] > key:
            new_arr[i + 1] = new_arr[i]
            i = i - 1
        new_arr[i + 1] = key
    return new_arr


if __name__ == "__main__":
    arr = [123, 235, 356, 567, 123, 2534, 312334565, 46, 12, 3, 435213, 532, 123]
    print(insert_sort(arr))
